In [1]:
import pandas as pd
from dotenv import load_dotenv
import os

load_dotenv()

path = 'https://docs.google.com/spreadsheets/d/{0}/export?gid=0&format=csv'
id = os.getenv("id")
df = pd.read_csv(path.format(id)).dropna()

print(df.shape)
df.columns
(41, 15)
Out[1]:
Index(['Nome', 'Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6', 'Q7', 'Q8', 'Q9', 'Q10',
       'Q11', 'Q12', 'Q13', 'Nota'],
      dtype='object')
In [2]:
import plotly.express as px 
import matplotlib.pyplot as plt

for name in df.columns.values:
    if df[name].dtype == 'float64' or df[name].dtype == 'int64':
        fig = px.histogram(df[name], title = name, labels = {
            "count" : "Número de Alunos",
            "value" : "Nota",
        })
        fig.show()
In [3]:
df2 = df.melt(id_vars="Nome")
#display(df2)
In [4]:
fig = px.box(df2, x = "variable", y = "value")
fig.show()